entry: Fix icon areas
authorTimm Bäder <mail@baedert.org>
Sun, 31 Jan 2016 15:17:03 +0000 (16:17 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 31 Jan 2016 19:05:52 +0000 (20:05 +0100)
Do the same thing we already do in gtk_entry_get_text_area.

gtk/gtkentry.c

index 4f169a76f05879b1091553dca78c2e61869fcdd6..68e6b5a429c27571b9dc1eb68faf1c91fda25aca 100644 (file)
@@ -9119,7 +9119,11 @@ gtk_entry_get_icon_area (GtkEntry             *entry,
 
   if (icon_info)
     {
+      GtkAllocation widget_allocation;
+      gtk_widget_get_allocation (GTK_WIDGET (entry), &widget_allocation);
       gtk_css_gadget_get_border_allocation (icon_info->gadget, icon_area, NULL);
+      icon_area->x -= widget_allocation.x;
+      icon_area->y -= widget_allocation.y;
     }
   else
     {